package com.tjsinfo.tjsoa.efile.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.tjsinfo.tjsoa.address.common.TAddresslistCommonManager;
import com.tjsinfo.tjsoa.efile.bo.EfileManage;
import com.tjsinfo.tjsoa.efile.bo.EfileManageImpl;
import com.tjsinfo.tjsoa.efile.dao.EfileDao;
import com.tjsinfo.tjsoa.efile.dao.IEfileDao;
import com.tjsinfo.tjsoa.efile.vo.Efile;
import com.tjsinfo.tjsoa.reminded.vo.TSystemReminded;


public class EfileDelAction extends Action {
	private IEfileDao efileDao;
	
	
	public IEfileDao getEfileDao() {
		return efileDao;
	}


	public void setEfileDao(IEfileDao efileDao) {
		this.efileDao = efileDao;
	}


	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		// TODO Auto-generated method stub
		try {
			Integer id = Integer.valueOf(request.getParameter("id"));
			Efile tsr=efileDao.findById(Integer.valueOf(id));
			efileDao.delete(tsr);
			return mapping.findForward("success");
		} catch (Exception e) {
			e.printStackTrace();
			return mapping.findForward("failed");
		}
	}
}
